package com.itheima.dao;

import com.itheima.pojo.Role;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.Set;

public interface RoleDao {

    //多对多 根据中间关系表和userId查询到与档期啊俺userId相关联到的角色集合
    @Select("select tr.* from t_role tr,t_user_role tur where tr.id=tur.role_id and user_id=#{user_id}")
    public Set<Role> findByUserId(@Param("user_id") Integer userId);
}
